﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="change_reservation.aspx.cs" Inherits="change_reservation" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
        <asp:View ID="View1" runat="server">
        <br /><br />
        <div align="center">
        <br /><br />
        <img src="Image/change-status.png" alt=""/><br /><br /><br />
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataKeyNames="ID" DataSourceID="orclDataSource" AllowPaging="True" 
                AllowSorting="True" ForeColor="#FFCC66" BorderColor="#4A1106"
                HorizontalAlign="Center" SelectedIndex="0" PageSize="20">
                <Columns>
                    <asp:CommandField ShowSelectButton="True">
                        <HeaderStyle BackColor="#4A1106" />
                    </asp:CommandField>
                    <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" 
                        SortExpression="ID" Visible="False" />
                    <asp:BoundField DataField="GUEST_ID" HeaderText="GUEST_ID" 
                        SortExpression="GUEST_ID" />
                    <asp:BoundField DataField="ROOM_NO" HeaderText="ROOM_NO" 
                        SortExpression="ROOM_NO" />
                    <asp:BoundField DataField="STAFF_ID" HeaderText="STAFF_ID" 
                        SortExpression="STAFF_ID" />
                    <asp:BoundField DataField="CHECKIN_DATE" HeaderText="CHECKIN_DATE" 
                        SortExpression="CHECKIN_DATE" ReadOnly="True" />
                    <asp:BoundField DataField="CHECKOUT_DATE" HeaderText="CHECKOUT_DATE" 
                        SortExpression="CHECKOUT_DATE" ReadOnly="True" />
                    <asp:BoundField DataField="STATUS" HeaderText="STATUS" 
                        SortExpression="STATUS" />
                </Columns>
                <HeaderStyle BackColor="#993300" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#CC9900" />
                <RowStyle HorizontalAlign="Center" />
                <SelectedRowStyle 
                    HorizontalAlign="Center" />
            </asp:GridView>
            <asp:SqlDataSource ID="orclDataSource" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString24 %>" 
                ProviderName="<%$ ConnectionStrings:ConnectionString24.ProviderName %>" 
                
                SelectCommand="SELECT ID, GUEST_ID, ROOM_NO, STAFF_ID, TO_DATE(CHECKIN_DATE, 'dd/mm/yyyy') AS CHECKIN_DATE, TO_DATE(CHECKOUT_DATE, 'dd/mm/yyyy') AS CHECKOUT_DATE, STATUS FROM RESERVATIONS ORDER BY ID">
            </asp:SqlDataSource>
            <asp:Label ID="Label1" runat="server"></asp:Label>
            <br />
            <asp:Button ID="Button2" runat="server" onclick="Button_Edit_Click" 
                Text="Edit" Height="25" Width="85" 
                BackColor="#FFCC66" BorderColor="#FF9966"/>
            &nbsp;
            <asp:Button ID="Button4" runat="server" BackColor="#FFCC66" 
                BorderColor="#FF9966" Height="25px" onclick="Back_Click" Text="&lt;&lt; Back" 
                Width="85px" />
        </div>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <div align="center">
                <br />
                <br />
                <br />
                <img src="Image/add-reservation.png" alt="" /><br />
                <br />
                <table>
                    <tr>
                        <td style="color: #FFCC66">
                            GUEST ID :
                        </td>
                        <td>
                            <asp:Label ID="Label2" runat="server" ForeColor="#FFCC66"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="color: #FFCC66">
                            ROOM No. :
                        </td>
                        <td>
                            <asp:Label ID="Label3" runat="server" ForeColor="#FFCC66"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="color: #FFCC66">
                            STAFF ID :
                        </td>
                        <td>
                            <asp:Label ID="Label4" runat="server" ForeColor="#FFCC66"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="color: #FFCC66">
                            CURRENT CHECK IN DATE :
                        </td>
                        <td>
                            <asp:Label ID="Label5" runat="server" ForeColor="#FFCC66"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="color: #FFCC66">
                            CURRENT CHECK OUT DATE :
                        </td>
                        <td>
                            <asp:Label ID="Label6" runat="server" ForeColor="#FFCC66"></asp:Label>
                        </td>
                    </tr>

                    <tr>
                        <td style="color: #FFCC66">
                            NEW CHECK IN DATE :
                        </td>
                        <td>
                            <asp:Label ID="label_new_in_date" runat="server" 
                                Text="Please Select Check in Date"></asp:Label>
                            <asp:Calendar ID="Calendar1" runat="server" BackColor="#FFFFCC" 
                                BorderColor="#FFCC66" BorderWidth="1px" DayNameFormat="Shortest" 
                                Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" Height="200px" 
                                onselectionchanged="Calendar1_SelectionChanged" ShowGridLines="True" 
                                Width="220px">
                                <DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />
                                <NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />
                                <OtherMonthDayStyle ForeColor="#CC9966" />
                                <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
                                <SelectorStyle BackColor="#FFCC66" />
                                <TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" 
                                    ForeColor="#FFFFCC" />
                                <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
                            </asp:Calendar>
                        </td>
                    </tr>

                    <tr>
                        <td style="color: #FFCC66">
                            NEW CHECK OUT DATE :
                        </td>
                        <td>
                            <asp:Label ID="label_new_out_date" runat="server" 
                                Text="Please Select Check out Date"></asp:Label>
                            <asp:Calendar ID="Calendar2" runat="server" BackColor="#FFFFCC" 
                                BorderColor="#FFCC66" BorderWidth="1px" DayNameFormat="Shortest" 
                                Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" Height="200px" 
                                onselectionchanged="Calendar2_SelectionChanged" ShowGridLines="True" 
                                Width="220px">
                                <DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />
                                <NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />
                                <OtherMonthDayStyle ForeColor="#CC9966" />
                                <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
                                <SelectorStyle BackColor="#FFCC66" />
                                <TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" 
                                    ForeColor="#FFFFCC" />
                                <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
                            </asp:Calendar>
                        </td>
                    </tr>

                    <tr>
                        <td style="color: #FFCC66">
                            STATUS :
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownList1" runat="server" BackColor="#FFCC66" Width="190px">
                                <asp:ListItem Value="Y">YES</asp:ListItem>
                                <asp:ListItem Value="N">NO</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <asp:Button ID="Button1" runat="server" Text="CHANGE STATUS RESERVATION" BackColor="#FFCC66"
                                BorderColor="#FF9966" Height="40px" OnClick="Change_Status_Click" 
                                Width="190px" />
                        </td>
                    </tr>
                </table>
                <asp:Label ID="Label7" runat="server" ForeColor="#FFCC66"></asp:Label>
                <br />
                <asp:Button ID="Button3" runat="server" BackColor="#FFCC66" 
                    BorderColor="#FF9966" onclick="Back_Click" Text="&lt;&lt; Back" 
                    Height="25px" Width="85px" />
            </div>
            <br />
            <br />
        </asp:View>
    </asp:MultiView>
</asp:Content>
